package de.kardass.jannobatch.examples.simple;

import de.kardass.jannobatch.errorhandler.ErrorHandler;
import de.kardass.jannobatch.errorhandler.ErrorHandlerReturnCode;
import de.kardass.jannobatch.errorhandler.HandledError;
import de.kardass.jannobatch.examples.simple.data.SimpleInputItem;

public class SimpleErrorHandler implements ErrorHandler<SimpleInputItem, Exception> {

	@Override
	public HandledError<SimpleInputItem, Exception> handleException(SimpleInputItem item, Exception exception) {
System.err.println("!!!!! handleException called for: " + item + " with exception " + exception.getMessage());
        return new HandledError<SimpleInputItem, Exception>(item, exception, ErrorHandlerReturnCode.CONTINUE_WITH_NEXT_ITEM);
	}

}
